﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<nelech.Models.DBModel.ListSpring>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	תוצאות חיפוש מעיינות - נלך
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="left">
  <%Html.RenderAction("AdvertShowThree", "Advert", new { id = 7 });%>
  
</div>
<div id="main">
    <h2>תוצאות חיפוש מעיינות</h2>
    <h3><% if (Model.isEmpty)
           {%>
           לא נמצאו תוצאות תואמות<%} %></h3>
<% var springs = Model.listMaayan;%>
    <%foreach (var item in springs)
       {%>
    <fieldset class="recommended">
        <legend>
            <%= Html.Encode(item.name) %>
        </legend>
        <p class="floatright">
            <% if (item.Image.Count > 0)
               {
                   var images = item.Image.OrderBy(p => p.path);
                   var firstImage = images.First();
                   var smallImageName = System.IO.Path.GetFileName(firstImage.path.Replace("\\", "/"));
            %>
           <img  src="<%= "/Upload/Thumbs/" + smallImageName %>" alt="<%= firstImage.text %>" width="150px" />
            <% } %></p><p>
            <%= Html.Encode(item.summary) %>
        </p>
        <p>
            <span class="bold">מפת סימון שבילים: </span>
            <%= Html.Encode(item.Regeon1.id + " - " + item.Regeon1.text) %><br />
            <span class="bold">עונת הנביעה:</span>
            <%= Html.Encode(item.Nevia1.text) %>
           </p>
        <p>
            <%= Html.ActionLink("להרחבה", "SpringInfo" ,new { id = item.id })%></p>
    </fieldset>
    <% } %>
    <br />
    <%= Html.ActionLink("לרשימת כל המעיינות", "AllList", "Home", new {id = 3 },null)%>
</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="publishTop" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Right" runat="server">
 <%Html.RenderAction("AdvertShowThree", "Advert", new { id = 6});%>
</asp:Content>

